#include "widget1.h"
#include "ui_widget1.h"
#include <QLineEdit>


Widget1::Widget1(FlightBookingSystem& system,Widget *las,QWidget *parent)
    : bookingSystem(system),
    last(las),
    QWidget(parent),
    ui(new Ui::Widget1)
{
    ui->setupUi(this);
}

Widget1::~Widget1()
{
    delete ui;
}



void Widget1::on_pushButton_cancel_clicked()
{
    emit this->back();
}


void Widget1::on_pushButton_determine_clicked()
{
    this->page1_1=new Form1_1(bookingSystem,this->destination);
    connect(this->page1_1,SIGNAL(back()),this->last,SLOT(comeBackToPrev1_1()));
    this->close();
    this->page1_1->show();
}


void Widget1::on_lineEdit_textChanged(const QString &arg1)
{
    string s=arg1.toStdString();
    this->destination=s;
}

